<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"
            integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
    <script src="/cookie.js"></script>
</head>
<body>
当前登陆的用户信息:<span id="userInfo"></span>
<script>
    getInfo();
    function getInfo() {
        $.ajax({
            url: "/user/getInfo",
            method: "get",
            data: {token: cookie.get("token")},
            success: function (data) {
                $("#userInfo").html(data);
            }
        })
    }
</script>
</body>
</html>